package day5;

import java.util.ArrayList;

public class Triangle {
    public static void main(String[] args) {
        ArrayList<Triangle> triangle=new ArrayList();
        Triangle sanjiao=new Triangle();
        sanjiao.setA(3);
        sanjiao.setB(4);
        sanjiao.setC(5);
        zhiJiao(sanjiao);
        dengYao(sanjiao);
        dengBian(sanjiao);
        zhouChang(sanjiao);
    }
    public void setA(int a) {
        this.a = a;
    }
    public void setB(int b) {
        this.b = b;
    }
    public void setC(int c) {
        this.c = c;
    }
    public static void zhiJiao(Triangle arr){
        int aa=arr.a;
        int bb=arr.b;
        int cc=arr.c;
        if(aa * aa + bb * bb == cc * cc || aa * aa + cc * cc == bb * bb || bb * bb + cc * cc == aa * aa){
            System.out.println("是直角三角形");
        }else{
            System.out.println("不是直角三角形");
        }
    }
    public static void dengYao(Triangle arr){
        int aa=arr.a;
        int bb=arr.b;
        int cc=arr.c;
        if( aa == bb || aa == cc || bb == cc){
            System.out.println("是等腰三角形");
        }else{
            System.out.println("不是等腰三角形");
        }
    }
    public static void dengBian(Triangle arr){
        int aa=arr.a;
        int bb=arr.b;
        int cc=arr.c;
        if( aa == bb && bb==cc){
            System.out.println("是等边三角形");
        }else{
            System.out.println("不是等边三角形");
        }
    }
    public static void zhouChang(Triangle arr){
        int aa=arr.a;
        int bb=arr.b;
        int cc=arr.c;
        int add=aa+bb+cc;
        System.out.println("周长为"+add);
    }
    public int a;
    public int b;
    public int c;

}
